/*
 * Copyright (c) 2019 Wormpex.com. All Rights Reserved.
 */

package com.sk.classloader;

/**
 * @author ke.su date: 2019-10-21 Time: 下午7:40
 */
public class TestClassLoader {
    public static void main(String[] args) {
        //System.out.println(Child.p);
        //System.out.println(Child.des);
        //System.out.println(Child.c);
        System.out.println(Parent.des);

    }
}

class Child extends Parent{
    static String c = "我是child";
    static String des = "我是child";
    static {
        System.out.println("我被初始化了-c");
    }
}

class Parent{
    static String p = "我是parent";
    static String des = "我是parent";
    static {
        System.out.println("我被初始化了-p");
    }
}
